package org.tagewerk.bookinfo.dao.impl.hibernate;

import java.util.List;
import java.util.Map;

import org.appfuse.dao.hibernate.GenericDaoHibernate;
import org.tagewerk.bookinfo.dao.BookDAO;
import org.tagewerk.bookinfo.model.Book;

public class BookDAOImpl extends GenericDaoHibernate<Book, Long> implements BookDAO {

	public BookDAOImpl(){
		super(Book.class);
	}
	
	public List<Book> findByAuthor(String author) {
		return getHibernateTemplate().find("from book where author =?", author);
	}
	
	public List<Book> findByISBN10(String isbn10) {
		return getHibernateTemplate().find("from book where isbn_10 =?", isbn10);
	}

	public List<Book> findByISBN13(String isbn13) {
		return getHibernateTemplate().find("from book where isbn_13 =?", isbn13);
	}


}
